package com.sunlong.jiangwei.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "jw_cart")
public class JwCart {
    @Id
    @KeySql(useGeneratedKeys = true)
    private Long cartId;

    private Long userId;

    private String spuStr;
    @Transient
    private JwSpu spu;

    private String skuStr;
    @Transient
    private JwSku sku;

    private Integer count;
    private Integer status;

    public JwCart(Long cartId) {
        this.cartId = cartId;
    }
}
